package com.xzhuang.task.util;

import java.util.List;

public class ResponseObject {

	private boolean success;
	private int error;
	private String errorMsg;
	private String command;
	private String requestCode;
	private List<Object> result = Lists.newArrayList();

	// private Map<String, Object> info = Maps.newHashMap();

	public void addData(Object obj) {
		result.add(obj);
	}

	/**
	 * @return the success
	 */
	public boolean isSuccess() {
		return success;
	}

	/**
	 * @param success
	 *            the success to set
	 */
	public void setSuccess(boolean success) {
		this.success = success;
	}

	/**
	 * @return the error
	 */
	public int getError() {
		return error;
	}

	/**
	 * @param error
	 *            the error to set
	 */
	public void setError(int error) {
		this.error = error;
	}

	/**
	 * @return the errorMsg
	 */
	public String getErrorMsg() {
		return errorMsg;
	}

	/**
	 * @param errorMsg
	 *            the errorMsg to set
	 */
	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public void setErrMsg(int error, String errorMsg) {
		this.error = error;
		this.errorMsg = errorMsg;
	}

	public String getCommand() {
		return command;
	}

	public void setCommand(String command) {
		this.command = command;
	}

	public List<Object> getData() {
		return result;
	}

	public void setData(List<Object> data) {
		this.result = data;
	}

	// public List<Object> getResultData() {
	// return resultData;
	// }
	//
	// public void setResultData(List<Object> resultData) {
	// this.resultData = resultData;
	// }

	/**
	 * @return the requestCode
	 */
	public String getRequestCode() {
		return requestCode;
	}

	/**
	 * @param requestCode
	 *            the requestCode to set
	 */
	public void setRequestCode(String requestCode) {
		this.requestCode = requestCode;
	}
}
